#include <stddef.h>
#include <stdio.h>

#if defined(_WIN32) && defined(_MSC_VER)
#define restrict __restrict
#endif

size_t strlen(const char *str)
{
	if (str == NULL)
		return 0;

	size_t counter = 0;
	while (*str++)
		++counter;
	return counter;
}

char *strcat(char *restrict dest, const char *restrict src)
{
	if (dest == src \
		|| dest == NULL)
		return dest;
	if (src == NULL)
	{
		dest[0] = '\0';
		return dest;
	}

	size_t counter = strlen(dest);
	while (*(dest + counter) = *src++)
		++counter;
	*(dest + counter) = '\0';
	return dest;
}

int main()
{
	char GUNDAM[BUFSIZ] = "freedom";
	strcat(GUNDAM, " and ");
	puts(strcat(GUNDAM, "justice"));
	return 0;
}
